import { SearchParam, SearchType } from '@/models/searchParams'
import { UserStatusOptions } from '@/constant/options'
import { UserResource } from '@/constant/resource'

export const searchOptions: Array<SearchParam> = [
  {
    label: '角色',
    key: 'roleId',
    type: SearchType.Select,
    value: '',
    options: [],
    placeholder: '请选择角色'
  },
  {
    label: 'ID',
    key: 'id',
    type: SearchType.Input,
    value: '',
    placeholder: '请输入ID'
  },
  {
    label: '用户名',
    key: 'username',
    type: SearchType.Input,
    value: '',
    placeholder: '请输入用户名',
    default: true
  },
  {
    label: '昵称',
    key: 'nickname',
    type: SearchType.Input,
    value: '',
    placeholder: '请输入用户昵称'
  },
  {
    label: 'Email',
    key: 'email',
    type: SearchType.Input,
    value: '',
    placeholder: '请输入用户邮箱'
  },
  {
    label: '状态',
    key: 'status',
    type: SearchType.Select,
    value: '',
    options: UserStatusOptions,
    placeholder: '请选择状态'
  },
  {
    label: '创建时间',
    key: 'createdTime',
    keys: ['createdTimeStart', 'createdTimeEnd'],
    type: SearchType.DateTimeRange,
    value: []
  }
]
